﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
    int shopManagerUserId = (int)ViewBag.ShopManagerUserId;
}

<style type="text/css">
    .table_search td {
        padding-right: 5px;
    }

        .table_search td:nth-child(even) {
            padding-right: 10px;
        }
</style>
<table class="table_search layui-form">
    <tr>
        <td>手机号码:</td>
        <td>
            <input type="text" class="layui-input" id="txtSearchPhone" maxlength="11"
                   style="width: 140px;" />
        </td>
        <td>姓名:</td>
        <td>
            <input type="text" class="layui-input" id="txtSearchName" maxlength="10"
                   style="width: 70px;" />
        </td>
        <td>邀请码:</td>
        <td>
            <input type="text" class="layui-input" id="txtSearchInvitationCode"
                   maxlength="6" style="width: 80px;" />
        </td>
        <td>推荐人:</td>
        <td>
            <input type="text" class="layui-input" id="txtSearchReference" maxlength="10"
                   style="width: 70px;" />
        </td>
        <td>推荐人邀请码:</td>
        <td>
            <input type="text" class="layui-input" id="txtSearchReferenceInvitationCode"
                   maxlength="6" style="width: 80px;" />
        </td>
        <td>状态:</td>
        <td>
            <div style="width: 100px;">
                <select id="sel-Search-State" lay-filter="filter-Search-State">
                    <option value="">请选择</option>
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                </select>
            </div>
        </td>
        <td>
            <button type="button" id="btnSearch" class="layui-btn layui-btn-normal">
                <i class="layui-icon layui-icon-search"></i>查 询
            </button>
        </td>
    </tr>
</table>

<style type="text/css">
    #UserTableContainer .layui-table-cell {
        height: 42px;
    }
</style>
<div style="margin-top: 10px;" id="UserTableContainer">
    <table class="layui-hide" id="User" lay-filter="user"></table>
</div>

<style type="text/css">
    .layui-bg-brown {
        background-color: brown;
    }
</style>
<script type="text/html" id="tableToolBar">
    <a class="layui-btn layui-btn-sm layui-bg-purple" lay-event="tool-viewUserAccountInfo" style="margin-left:2px;">账户信息</a>
    <a class="layui-btn layui-btn-sm layui-bg-blue" lay-event="tool-viewUserStructure" style="margin-left:2px;">查看架构</a>
    <a class="layui-btn layui-btn-sm layui-bg-green" lay-event="tool-updateUser" style="margin-left:2px;">修改用户</a>
    <a class="layui-btn layui-btn-sm layui-bg-brown" lay-event="tool-updateUserReference" style="margin-left:2px;">调整所属</a>
    <a class="layui-btn layui-btn-sm layui-bg-cyan" lay-event="tool-updateUserState" style="margin-left:2px;">用户状态</a>
    <a class="layui-btn layui-btn-sm layui-bg-red" lay-event="tool-viewShopManagerLevel" style="margin-left:2px;">店长级别</a>
    <a class="layui-btn layui-btn-sm layui-bg-orange" lay-event="tool-resetPwd" style="margin-left:2px;">重设密码</a>
</script>

<style type="text/css">
    .userAccountInfoTable {
    }

        .userAccountInfoTable td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ViewUserAccountInfoDlg">
    <div class="layui-tab">
        <ul class="layui-tab-title">
            <li class="layui-this">微信收款码</li>
            <li>支付宝收款码</li>
            <li>银行卡信息</li>
        </ul>
        <div class="layui-tab-content" style="padding: 0px;">
            <div class="layui-tab-item layui-show"><img class="wechat" /></div>
            <div class="layui-tab-item"><img class="alipay" /></div>
            <div class="layui-tab-item" style="padding-top: 10px;">
                <table align="center" class="userAccountInfoTable">
                    <tr>
                        <td align="right">开户名:</td>
                        <td><label class="lbBankAccountName"></label></td>
                    </tr>
                    <tr>
                        <td align="right">开户行:</td>
                        <td><label class="lbBankName"></label></td>
                    </tr>
                    <tr>
                        <td align="right">卡号:</td>
                        <td><label class="lbBankCardNo"></label></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</script>

<script type="text/html" id="ViewUserStructureDlg">
    <form class="layui-form" style="padding: 10px;">
        <div></div>
    </form>
</script>

<style type="text/css">
    .updateDlgTable td {
        padding: 5px;
    }
</style>
<script type="text/html" id="UpdateUserInfoDlg">
    <form class="layui-form" style="padding: 10px;">
        <table class="updateDlgTable">
            <tr>
                <td align="right">手机号码:</td>
                <td>
                    <input class="layui-input" name="txt-updateUserDlg-phone" lay-verify="required|phone"
                           maxlength="11" lay-reqtext="请输入手机号码" lay-vertype="tips" />
                </td>
            </tr>
            <tr>
                <td align="right">姓名:</td>
                <td>
                    <input class="layui-input" name="txt-updateUserDlg-name" lay-verify="required|name"
                           maxlength="10" lay-reqtext="请输入姓名" lay-vertype="tips" />
                </td>
            </tr>
            <tr>
                <td align="right" style="height:30px;" valign="middle">&nbsp;&nbsp;</td>
                <td align="right" valign="middle">
                    <button class="layui-btn" lay-submit="" lay-filter="filter-updateUserDlg-ok">确定</button>
                </td>
            </tr>
        </table>
    </form>
</script>

<style type="text/css">
    #UpdateUserReferenceDlg2 td {
        padding: 5px;
    }
</style>
<script type="text/html" id="UpdateUserReferenceDlg">
    <form class="layui-form" style="padding: 10px; width: 350px; height: 180px;">
        <table align="center">
            <tr>
                <td align="right">姓名:</td>
                <td><label id="lb-UpdateUserReferenceDlg-Name"></label></td>
            </tr>
            <tr>
                <td align="right">邀请码:</td>
                <td><label id="lb-UpdateUserReferenceDlg-InvitationCode"></label></td>
            </tr>
            <tr>
                <td align="right">推荐人:</td>
                <td>
                    <label id="lb-UpdateUserReferenceDlg-Reference"></label>
                </td>
            </tr>
            <tr>
                <td align="right">推荐人邀请码:</td>
                <td>
                    <div style="float: left;">
                        <input class="layui-input" maxlength="6" style="width: 100px;"
                               id="txt-UpdateUserReferenceDlg-ReferenceInvitationCode" />
                    </div>
                    <div style="float: left; margin-left: 10px;">
                        <button type="button" id="btn-UpdateUserReferenceDlg-Search" class="layui-btn layui-bg-red layui-btn-normal">
                            <i class="layui-icon layui-icon-search"></i>验 证
                        </button>
                    </div>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btn-UpdateUserReferenceDlg-OK" class="layui-btn layui-btn-normal">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>

<style type="text/css">
    #UpdateUserStateDlg2 td {
        padding: 5px;
    }
</style>
<script type="text/html" id="UpdateUserStateDlg">
    <form class="layui-form">
        <div style="width: 280px; height: 140px; padding: 10px;">
            <table align="center" width="100%">
                <tr>
                    <td align="right">状态: </td>
                    <td>
                        <select id="sel-UpdateUserStateDlg-State">
                            <option value="1">启用</option>
                            <option value="0">禁用</option>
                        </select>
                    </td>
                </tr>
                <tr style="height: 38px;">
                    <td align="right" width="60">姓名: </td>
                    <td><label id="lb-UpdateUserStateDlg-Name"></label></td>
                </tr>
                <tr>
                    <td>&nbsp;&nbsp;</td>
                    <td>
                        <button type="button" id="btn-UpdateUserStateDlg-OK" class="layui-btn layui-btn-normal">
                            <i class="layui-icon layui-icon-ok"></i>确定
                        </button>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</script>

<style type="text/css">
    .viewShopManagerLevelDlgTable td {
        padding: 5px;
    }
</style>
<script type="text/html" id="ViewShopManagerLevelDlg">
    <form class="layui-form" style="padding: 10px; width: 300px; height: 300px;">
        <table class="viewShopManagerLevelDlgTable">
            <tr>
                <td align="right">店长级别:</td>
                <td>
                    <select id="selShopManagerLevel" lay-filter="filter-sel-shopManagerLevel">
                        <option value="0" selected="selected">自动计算</option>
                        <option value="0.005">初级店长</option>
                        <option value="0.006">中级店长</option>
                        <option value="0.007">高级店长</option>
                        <option value="0.008">旗舰店长</option>
                        <option value="0.01">直营店长</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>&nbsp;&nbsp;</td>
                <td>
                    <button type="button" id="btnViewShopManagerLevelOK" class="layui-btn layui-btn-sm">
                        <i class="layui-icon layui-icon-ok"></i>确 定
                    </button>
                </td>
            </tr>
        </table>
    </form>
</script>

<style type="text/css">
    .resetDlgTable {
        margin: 15px;
    }

        .resetDlgTable td {
            padding: 5px;
        }
</style>
<script type="text/html" id="ResetPwdDlg">
    <form class="layui-form" action="">
        <table class="resetDlgTable">
            <tr>
                <td align="right">新密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|pwd"
                           lay-vertype="tips" maxlength="20" id="txt-resetPwdDlg-newPwd" lay-reqtext="请输入新密码">
                </td>
            </tr>
            <tr>
                <td align="right">确认新密码:</td>
                <td>
                    <input type="password" class="layui-input" lay-verify="required|pwd|pwd2"
                           lay-vertype="tips" maxlength="20" id="txt-resetPwdDlg-newPwd2" lay-reqtext="请输入确认新密码">
                </td>
            </tr>
            <tr>
                <td align="right">&nbsp;&nbsp;</td>
                <td align="right">
                    <button class="layui-btn" lay-submit="" lay-filter="filter-resetPwdDlg-ok">确定</button>
                </td>
            </tr>
        </table>
    </form>
</script>
<input type="hidden" id="hdShopManagerUserId" value="@shopManagerUserId" />
<script type="text/javascript" src="~/Static/Js/user.js?rand=0123456789"></script>